<?php
$intProvince	= $objRequest->getParam('province', 0);
$intOption		= $objRequest->getParam('option', 0);
$strKey			= $objRequest->getParam('key', '');
$strStart		= $objRequest->getParam('startdate', '');
$strEnd			= $objRequest->getParam('enddate', '');
$intPage		= $objRequest->getParam('page', 1);
$intCancel		= $objRequest->getParam('pcancel', 0);
$intLimit		= ADMIN_LIMIT;
$intOff			= (($intPage-1) * $intLimit);
$intTotal		= 0;
$objPlace		= new Place(); 
$objCommon		= new Vfriend_Common();
$arrResult		= $objPlace->getAll($intStatus, $intProvince, $intOption, $strKey, Vfriend_Function::convertStrToDate($strStart), Vfriend_Function::convertStrToDate($strEnd), $intOff, $intLimit, $intTotal);
if($strOption != '' || $strKey != '' || $strStart != '' || $strEnd != '') {
	$_SESSION['plcancel'] 	= 1;	
	$_SESSION['plpost']	 	= $objRequest->getParams();
}
else {
	if(isset($_SESSION['plpost'])) unset($_SESSION['plpost']);
	if(isset($_SESSION['plcancel'])) unset($_SESSION['plcancel']);
}
if($intCancel) {
	if(isset($_SESSION['plpost'])) unset($_SESSION['plpost']);
	if(isset($_SESSION['plcancel'])) unset($_SESSION['plcancel']);
}
# list
$this->view->arrResult		= $arrResult;
$this->view->intTotal		= $intTotal;
$this->view->intOffset		= $intOff;
$this->view->intLimit		= $intLimit;
$this->view->strUrl			= Vfriend_Function::getUrl();
$this->view->arrOption		= $arrOption;
$this->view->arrProvince	= $objCommon->getProvince();
?>